var Wxcommon = function() {


    var _init = function() {

        // 表单提交
        $('.save-btn').on('click', function(){
            var url = $('.ajax-form').attr('action');
            var data = $('.ajax-form').serialize();

            $.ajax({
                url: url,
                type: 'POST',
                data: data,
                dataType : 'json',
                success: function (data) {
                    layer.msg(data.msg);
                    if(data.status == 1){
                        //window.location.reload();
                    }
                }
            });
            return false;
        });
    };

    return {
        init: function() {
            _init();
        }
    };

}();


$(function() {
    Wxcommon.init();

});
